package com.sec.moveFile.schedule;

import com.sec.moveFile.service.MoveFileService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author 68300119
 * @Date 2021/5/14
 **/
@Component
public class MoveFileSchedule {

    private final MoveFileService moveFileService;


    public MoveFileSchedule(MoveFileService moveFileService) {
        this.moveFileService = moveFileService;
    }


    /**
     * 每天0点跑
     */
    @Scheduled(cron = "0 0/10 * * * ? ")
    public void moveFile() throws InterruptedException {
        moveFileService.moveFile();
    }
}
